<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            *{
                padding:0;
                margin: 0;
            }

            .a{
                width: 200px;
                height: 200px;
                background-color: red;
            }

            .b{
                width: 300px;
                height: 300px;
                background-color: blue;
                /*把元素当成一个完全独立的容器，他的子元素不会对他造成影响*/
                overflow: hidden;
            }

            .c{
                width: 100px;
                height: 100px;
                background-color: yellow;
                margin-left: 50px;
                margin-top: 50px;
            }

        </style>
    </head>
    <body>
        <div class="a"></div>
        <div class="b">
            <div class="c"></div>
        </div>
    </body>
</html>